//
// Created by Administrator on 2024/5/27.
//

#ifndef DEVICE_H
#define DEVICE_H
#include "Defines.hpp"

namespace NaturalEngine {
    /**
     * 绘画上下文
     */
    class IDrawContext {
    public:
        virtual ~IDrawContext() {
        }
    };

    /**
     * 绘画上下文信息
     */
    struct DrawContextInfo {
        i32 Width;
        i32 Height;
    };

    /**
     * 设备上下文接口
     */
    class IDeviceContext {
    public:
        virtual ~IDeviceContext() {
        }

        virtual std::unique_ptr<IDrawContext>
        CreateDrawContext(const DrawContextInfo &);
    };

    /**
     * 设备的抽象接口层
     */
    class IDevice {
    public:
        virtual ~IDevice() {
        }

        virtual std::unique_ptr<IDeviceContext> CreateContext() = 0;
    };


    /**
     * 设备提供者
     */
    class IDeviceProvider {
    public:
        virtual ~IDeviceProvider() {
        }

        virtual std::unique_ptr<IDevice> CreateDevice() = 0;
    };
} // namespace NaturalEngine

#endif // DEVICE_H
